package main

import "fmt"

func main(){
	var array = [...]int{1,2,3,4,5}
	var slice = array[1:4]
	var capacity int = cap(slice)
	var length int = len(slice)
	fmt.Println(capacity,length)
	var slice2 []int
	fmt.Println(slice2 == nil)
	var slice3 = array[0:2:3]
	slice3 = slice3[:cap(slice3)]
	fmt.Println(slice3)
	var slice4 = append(slice3,4,5)
	fmt.Println(slice4)
	slice4[2]=0
	fmt.Println(array,slice4)
	slice3[2]=0
	fmt.Println(array,slice3)
	var slice5 = []int{0}
	fmt.Println(slice5)
	copy(slice5,slice3)
	fmt.Println(slice5)
	slice6:=make([]int,3,5)
	slice7:=make([]int,3)
	fmt.Println(slice6,slice7)
	slice6=slice6[:cap(slice6)]
	fmt.Println(slice6)
}